<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\park\validate;

use think\Validate;

/**
 * 园区视频验证器
 */
class ParkVideoValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'video_title' => 'require',
        'video_path' => 'require',
        'cover_image' => 'require',
        'is_display' => 'require',
        'sort_order' => 'require',
       
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'video_title' => '视频标题必须填写',
        'video_path' => '视频必须填写',
        'cover_image' => '封面图必须填写',
        'is_display' => '是否展示必须填写',
        'sort_order' => '排序序号必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'video_title',
            'video_path',
            'cover_image',
            'is_display',
            'update_time',
            'sort_order',
            'create_time',
        ],
        'update' => [
            'video_title',
            'video_path',
            'cover_image',
            'is_display',
            'update_time',
            'sort_order',
            'create_time',
        ],
    ];

}
